package com.ymy.sample.Service.Impl;

import com.ymy.sample.Dao.UsersDao;
import com.ymy.sample.Entity.UsersEntity;
import com.ymy.sample.Service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ymy.hadoop
 * @date 2019/3/19 上午11:21
 */
@Service
public class UserServiceImpl implements UsersService {

    @Autowired
    private UsersDao usersDao;

    @Override
    public List<UsersEntity> usersList() {
        return usersDao.usersList();
    }

    @Override
    public UsersEntity findUserOne(String name) {
        return usersDao.findUserOne(name);
    }

    @Override
    public void saveUser(UsersEntity usersEntity) {
        usersDao.saveUser(usersEntity);
    }

    @Override
    public void updateUser(UsersEntity usersEntity) {
        usersDao.updateUser(usersEntity);
    }

    @Override
    public void removeUser(String name) {
        usersDao.removeUser(name);
    }
}
